<?php
class CaptchaComponent extends Object {
    var $Controller = null;
 
    function startup(&$controller)
    {
        $this->Controller = $controller;
    }
 
    function render()
    {
        App::import('vendor', 'kcaptcha/kcaptcha');
        $kcaptcha = new KCAPTCHA();
        $this->Controller->Session->write('captcha', $kcaptcha->getKeyString());
        exit;
    }

/*
    function _checkCaptcha($model) {
        if ($this->Session->check('captcha')) {
            $s_captcha = $this->Session->read('captcha');
     
            if (!empty($this->data[$model]['captcha']) && $this->data[$model]['captcha'] == $s_captcha) {
                return true;
            }
        }
       
        return false;
    }
*/
 
}
?>